﻿using Microsoft.AspNet.Identity.EntityFramework;
using MuseumApp315.Data.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.Entity;

namespace MuseumApp315.Data
{

    public class ApplicationDbContext : IdentityDbContext<ApplicationUser>
    {
        public ApplicationDbContext()
            : base("Museum315Connection", throwIfV1Schema: false)
        {
            // related to LINQ queries....
            this.Configuration.LazyLoadingEnabled = true;
        }

        public DbSet<Museum> Museums { get; set; }
        public DbSet<Review> Reviews { get; set; }
        public DbSet<Tag> Tags { get; set; }
        public DbSet<MuseumTags> MuseumTags { get; set; }


        public static ApplicationDbContext Create()
        {
            return new ApplicationDbContext();
        }
    }
}
